<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
        /*
        子元素float,让父元素有高度
        1.给父元素overflow:hideen;
        */
        .parent{
            /* overflow: hidden; */
            width: 200px;
            background: red;
        }
        .child{
            width: 100px;
            height: 50px;
            background: yellow;
            float: left;
        }
        .two{
            width: 150px;
            height: 150px;
            background: green;
            /* float: left; */
        }
    </style>
</head>
<body>
    <!-- 目的：为了让元素并排显示 -->
    <!-- 原理 -->
    <!-- 子元素float，父元素没有了高度 -->
    <div class="parent">
        <div class="child"></div>
    </div>
    <div class="two"></div>
</body>
</html>